-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Fix excel-related docstring errors #24503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* upstream/master: DOC: Fixing broken references in the docs (pandas-dev#24497) DOC: Splitting api.rst in several files (pandas-dev#24462) Fix misdescription in escapechar (pandas-dev#24490) Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355) BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434) Misc separable pieces of pandas-dev#24024 (pandas-dev#24488) use capsys.readouterr() as named tuple (pandas-dev#24489) REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496) TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480) DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428) BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483) Implement reductions from pandas-dev#24024 (pandas-dev#24484)
pandas/io/excel.py
Outdated
Name Value | ||
0 string1 1 | ||
1 string2 2 | ||
2 #string3 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this hash on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is for the last example. pd.read_excel('tmp.xlsx', index_col=0, comment='#')
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change from #string3
to #Comment
to avoid confusion.
@datapythonista @WillAyd @gfyoung if any comments. |
|
@thoo, @datapythonista just changed this a bit, can you post what happens? |
I got errors like I just submitted the issue here #24505. Please let me know if you need any other info. |
@thoo I just built
I think we do a clean before the build, and if I'm not wrong I left the clean of the |
Ups, sorry, my bad. I didn't have the last changes, looks like building a single API doc is broken after splitting |
@datapythonista Thanks. I will remove |
Opened #24506, which should fix the problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one minor thing, other than that lgtm. Thanks @thoo
pandas/io/excel.py
Outdated
* Defaults to ``0`` : 1st sheet as a `DataFrame` | ||
* ``1`` : 2nd sheet as a `DataFrame` | ||
* ``"Sheet1"`` : Load sheet with name "Sheet1" | ||
* ``[0,1,"Sheet5"]`` : Load first, second and sheet named "Sheet5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add spaces after the commas? Also, unless the formatting changes, I don't think we need the spaces before the colons here (it's required for the parameters, but this is a regular list).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@thoo if you'd pull from master, you should be able to build single pages now. |
@jreback @datapythonista Thanks. It is working. |
Codecov Report
@@ Coverage Diff @@
## master #24503 +/- ##
===========================================
- Coverage 92.31% 43.05% -49.26%
===========================================
Files 166 166
Lines 52391 52391
===========================================
- Hits 48363 22557 -25806
- Misses 4028 29834 +25806
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24503 +/- ##
==========================================
- Coverage 31.89% 31.88% -0.02%
==========================================
Files 166 166
Lines 52421 52434 +13
==========================================
- Hits 16722 16718 -4
- Misses 35699 35716 +17
Continue to review full report at Codecov.
|
* upstream/master: REF/TST: replace capture_stdout with pytest capsys fixture (pandas-dev#24501) BUG: fix .iat assignment creates a new column (pandas-dev#24495) DOC: add checks on the returns section in the docstrings (pandas-dev#23138) (pandas-dev#23432) ENH: Add strings_as_fixed_length parameter for df.to_records() (pandas-dev#18146) (pandas-dev#22229) TST: Skip db tests unless explicitly specified in -m pattern (pandas-dev#24492) Mix EA into DTA/TDA; part of 24024 (pandas-dev#24502) DOC: Fix building of a single API document (pandas-dev#24506)
It looks like |
there are some tests that check the content of the docstrings, so it's probably related to it, I'd take a look |
thanks @thoo |
git diff upstream/master -u -- "*.py" | flake8 --diff
python make.py --single pandas.related-doc
Fix errors which are reported by
scripts/validate_docstrings.py
: